/*
 *	BoingWM APIs and stuff
 *
 *	(c)2007 Scott Lawrence
 *

NOTE:
	This file is just a placeholder for various header and
	structure bits as I work through the design

 */

/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __BOINGWM_H__

#define STYLE_WL	(0)	/* WindowLab origial */

#define STYLE_10	(10)	/* AmigaOS 1.0 */
#define STYLE_11	(11)	/* AmigaOS 1.1 */
#define STYLE_12	(12)	/* AmigaOS 1.2 */
#define STYLE_13	(13)	/* AmigaOS 1.3 */
#define STYLE_14	(14)	/* AmigaOS 1.4 */
#define STYLE_1x	(15)	/* AmigaOS 1.x */
#define STYLE_20	(20)	/* AmigaOS 2.0 */
#define STYLE_30	(30)	/* AmigaOS 3.0 */
#define STYLE_40	(40)	/* AmigaOS 4.0 */

#define STYLE_TOS	(100)	/* Atari ST-TOS */

#define STYLE_LISA	(200)	/* Apple Lisa */
#define STYLE_MAC6	(206)	/* Mac System 6 (Monochrome) */
#define STYLE_MAC7	(207)	/* Mac System 7 */
#define STYLE_MAC8	(208)	/* MacOS 8 */

#define STYLE_BeOS	(300)	/* BeOS */


#define FLAG_RESIZEFRAME	(0x0001)	/* drag the frame to resize */
#define FLAG_RESIZECORNER	(0x0002)	/* only the corner resizes */
#define FLAG_THICKEAST		(0x0010)	/* thick East border */
#define FLAG_THICKSOUTH		(0x0020)	/* thick South border */
#define FLAG_THICKWEST		(0x0040)	/* thick West border */


#define PALETTE_WL	(0)	/* WindowLab original (for testing) */
#define PALETTE_11	(11)	/* AmigaOS 1.1 palette */
#define PALETTE_13	(13)	/* AmigaOS 1.3 palette */
#define PALETTE_20	(20)	/* AmigaOS 2.0 palette */
#define PALETTE_40	(40)	/* AmigaOS 4.0 palette */
#define PALETTE_TOS	(100)	/* Atari ST-TOS Palette */
#define PALETTE_LISA	(200)	/* Apple LISA Palette */
#define PALETTE_MAC6	(206)	/* Mac System 6 Palette */
#define PALETTE_MAC7	(208)	/* Mac System 7 Palette */
#define PALETTE_MAC8	(208)	/* MacOS 8 Palette */
#define PALETTE_BeOS	(300)	/* BeOS Palette */


/* this is the current configuration as it has been read in by the .rc parser.
*/
typedef struct BOINGWM_CFG {
	int Style;	/* decoration style */
	int Flags;	/* various visual cue flags */
	int Scale;	/* if the gui is rescaleable, this is the multiplier */
	int Palette;	/* internal selectable for now */
} BOINGWM_CFG;


/* and here is what each decoration library will provide */

#define PADDING_NORTH	(0)
#define PADDING_EAST	(1)
#define PADDING_SOUTH	(2)
#define PADDING_WEST	(3)

#define WIDGET_CLOSE		(0)
#define WIDGET_ICONIFY		(1)
#define WIDGET_ZOOM		(2)
#define WIDGET_RAISE		(3)
#define WIDGET_LOWER		(4)
#define WIDGET_RAISELOWER	(5)

/* callback functions
 *	- these are called by the window manager at a few different times.
 */

struct BOINGWM_CFG;
struct DECORATION_API;

/* BW_StructFill 
 *	- only called at init time
 * 	- the decoration is to fill in its padding parameters
 */
typedef void (*BW_StructFill)    ( BOINGWM_CFG *, struct DECORATION_API * );

/* BW_DrawHeaderBar
 *	- the decoration is to draw the titlebar for the screen
 */
typedef void (*BW_DrawHeaderBar) ( BOINGWM_CFG * );

/* BW_DrawDragBar
 *	- draw the window title/drag bar ( .. x, y, w, h )
 */
typedef void (*BW_DrawDragBar)   ( BOINGWM_CFG *, int, int, int, int );

/* BW_DrawWidget
 *	- draw a specific WIDGET_ as defined above ( .. ID, x, y, w, h )
 */
typedef void (*BW_DrawWidget)    ( BOINGWM_CFG *, int, int, int, int, int );

typedef struct DECORATION_API {
	int StyleID;			/* our Style ID, for static structs */
	BW_StructFill * structFill;	/* core calls this to set values: */
	BW_DrawHeaderBar * drawHdr;	/* draw the screen header */
	BW_DrawDragBar * drawDrg;	/* draw the dragbar */
	BW_DrawWidget * drawWdg;	/* draw a misc widget */

	int N_Padding;	/* number of bytes needed for North Padding */
	int S_Padding;	/* number of bytes needed for South Padding */
	int E_Padding;	/* number of bytes needed for East Padding */
	int W_Padding;	/* number of bytes needed for West Padding */
	
} DECORATION_API;



#endif
